#include <iostream>



class demo
{
public:
    demo()
    {
        std::cout<<"demo ()\n";
        m=new int(0);
    }
    demo(int a)
    {
        std::cout<<"demo(int a)\n";
        m=new int(a);
    }
    demo(const demo &d)
    {
        std::cout<<"demo(const demo &d)\n";
        m=new int(*d.m);
    }
    ~demo()
    {
        std::cout<<"~demo()\n";
        delete m;
    }
    demo(demo &&d)
    {
        this->m=d.m;
        d.m=NULL;
        std::cout<<"demo(demo &&d)\n";
    }
    demo GetCopy()
    {
        demo temp =*this;
        return temp;
    }
private:
    int *m;
};

int main()
{
    demo a=demo(10);
    demo b=std::move(a);
    return 0;
}